#ifndef __VECTOR3_H__
#define __VECTOR3_H__

typedef double ValueType;
typedef struct {
	ValueType data[3];
	int size;
}Vector3d;

Vector3d* vector3d_create(ValueType d[]);
Vector3d* vector3d_free(Vector3d* vector);


Vector3d* vector3d_add(Vector3d* a, Vector3d* b, Vector3d* c);
Vector3d* vector3d_sub(Vector3d* a, Vector3d* b, Vector3d* c);
Vector3d* vector3d_mul_scalar(Vector3d* a, ValueType k, Vector3d* b);

ValueType vector3d_dot(Vector3d* a, Vector3d* b);
ValueType vector3d_cross(Vector3d* a, Vector3d* b);

ValueType vector3d_norm(Vector3d* a);
Vector3d* vector3d_normalize(Vector3d* a);

#endif //__VECTOR3_H__
